	$(window).load(function(){
		if ($('.photoUl a').length) {
			$('.photoUl a').each(function() {
				var img = $(this).data('img');
				$(this).css('background-image', 'url(' + img.split('?')[0] +')');
			});

			$('#main .sec02 .photoUl').each(function(){
				$(this).liMarquee({
					hoverstop: false,
					scrollamount: 72,
				})
			})
		}

		setTimeout(function(){
			$('.target').scrollClass();
		},500);
		
		$('.cover').fadeOut(800);
	})
	
	$(function(){
		/*$('#main .sec02 .photoUl li a').on('mouseover', function () {
			$(this).addClass('hover');
		}).on('mouseout', function () {
			$(this).removeClass('hover');
		});
		
		$('#main .sec02 .photoUl li a').on('touchstart', function () {
			$(this).addClass('hover');
		}).on('touchend', function () {
			$(this).removeClass('hover');
		});*/


		//$('.sec02 .str_origin').css({"left":0})


		$('.sec01').height(window.innerHeight);
		
		//var h = window.innerHeight/3;
		//alert(window.screen.height+','+window.screen.availHeight+','+window.innerHeight+','+$(window).innerHeight());
		//alert($('.cover').height());
		if($(window).width() > 767){
			var h = window.innerHeight/3;
		}else{
			var h = $('.cover').height()/3;
		}
		$('.sec02 .subListBox li,#main .sec02 .photoUl').height(h);
		$('.sec02 .subListBox li a').height(h).width(h);
		
		$(window).resize(function(){
			if($(window).width() > 767){
				$('.sec01').height(window.innerHeight);
				
				var h = window.innerHeight/3;
				$('.sec02 .subListBox li,#main .sec02 .photoUl').height(h);
				$('.sec02 .subListBox li a').height(h).width(h);
				$('.photoUl').each(function(){
					var that = $(this);
					setTimeout(function(){
						that.find('.str_move_clone').width(10*h);
					},100);
					
				});
			}
		});
		/*
		window.addEventListener("orientationchange", function() {
			/*setTimeout(function(){
				$('.sec01').height(window.innerHeight);
				
				var h = $('.cover').height()/3;
				$('.sec02 .subListBox li,#main .sec02 .photoUl').height(h);
				$('.sec02 .subListBox li a').height(h).width(h);
				$('.photoUl').each(function(){
					var that = $(this);
					setTimeout(function(){
						that.find('.str_move_clone').width(10*h);
					},100);
					
				});
			},500);*/
			/*setTimeout(function(){window.location.reload()},100);
		});
		*/
		$(window).scroll(function(){
			if($(window).scrollTop() > $('.sec01').height()){
				$('.sec02 .subListBox').removeClass('fix');
				$('.sec02').css('paddingTop',0);
				if($(window).width() > 767){
					var h = 60;
				}else{
					var h = 50;
				}
				if($(window).scrollTop() > $('.sec01').height() + $('.sec02 .subListBox').height() - h){
					$('#gHeader').addClass('bg');
				}else{
					$('#gHeader').removeClass('bg');
				}
			}else{
				$('.sec02 .subListBox').addClass('fix');
				$('.sec02').css('paddingTop',$('.sec02 .subListBox').height());
			}
		}).trigger('scroll')
			
	});
